Recently, there have been many developments in algorithms for compressing data (also called “compression methods” below). The data compression ratio varies with the compression method. Furthermore, even when using the same compression method, the data compression ratio also varies with the contents of the data that is to be compressed (called “object data” below). Therefore, the compression method which has a high compression ratio and results in a small data size after compression varies with the object data.
Consequently, in order to determine a compression method having a high compression ratio for object data, there is a method which compresses the object data in accordance with each of a plurality of compression methods and then determines the compression method having the highest compression ratio on the basis of the compression results. However, since the data is compressed by using each of the plurality of compression methods, then the time taken for compression becomes long.
On the other hand, there is also a method in which a portion, rather than the whole, of the object data is compressed in accordance with each of a plurality of compression methods and the compression method is determined on the basis of the compression results. This method reduces the time taken for compression, since only a portion of the object data is compressed.
Technology relating to compression methods is described, for example, in Japanese Laid-open Patent Publication No. H04-241681, Japanese Laid-open Patent Publication No. 2007-25073 and Japanese Laid-open Patent Publication No. H07-170489.